package com.omiis.wechat.performance_test2;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

	public static String getCurrentTimeMillis() {
		return String.valueOf(System.currentTimeMillis());
	}

	private static String defaultFormat = "yyyy-MM-dd HH:mm:ss";

	public static String getCurrentDate() {
		return formatDate(new Date(), defaultFormat);
	}

	/**
	 * 默认日期格式 当前日期
	 * 
	 * @return
	 */
	public static String formatDate(Date date, String format) {
		SimpleDateFormat sdf = new SimpleDateFormat(defaultFormat);
		return sdf.format(date);
	}
}
